#ifndef HANDLE_FILE_SYSTEM
#define HANDLE_FILE_SYSTEM

#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <boost/filesystem.hpp>
using namespace std;
using namespace boost::filesystem;

class ASession {
public:
 
	ASession(string _start_time_, string _end_time_, string _jaccount_):start_time_(_start_time_),
		end_time_(_end_time_), jaccount_(_jaccount_)  {} 
 
  string start_time_;
  string end_time_;
  string jaccount_;
};


//	read user log
// input format is
// ip_address N jaccount1 from_time1 end_time1 ... jccountN from_timeN end_timeN
void getUserLog(const string &filename);


//	input directory
//	output a vector containing all the name in that directory
void getFileName(const string &dir_name);


//	input each user and its corresponding traffic (packets)
//	write to file system 
//	write format is UserData/downstream(upstream)/jaccount
//	type == 0 downstream, type == 1 upstream
void writeToFile(const string&dirname, const map<string, vector<string>> &traffic, int type);



#endif 